//www.elegoo.com
//2016.12.12

/************************
Exercise the motor using
the L293D chip
************************/

#define ENABLE 5
#define DIRA 3
#define DIRB 4

int i;
 
void setup() {
  //---set pin direction
  pinMode(ENABLE,OUTPUT);
  pinMode(DIRA,OUTPUT);
  pinMode(DIRB,OUTPUT);
  Serial.begin(9600);
}

void loop() {
  //---back and forth example
    Serial.println("ATTRACTION");
    digitalWrite(ENABLE,HIGH); // enable on
    digitalWrite(DIRA,HIGH); //one way
    digitalWrite(DIRB,LOW);
//    delay(500);
//    digitalWrite(DIRA,LOW);  //reverse
//    digitalWrite(DIRB,HIGH);
//    delay(500);
}
   
